package control;

import javax.microedition.lcdui.Graphics;

public class Panel extends GroupControl{
	protected int x,y,w,h;
	
	public Panel(int x,int y,int w,int h,int numControl) {
		super(numControl);
		this.x = x;
		this.y = y;
		this.w = w;
		this.h = h;
	}
	protected void controlPaint(Graphics g)
	{
		g.setColor(COLOR_BACK);
		g.fillRect(x, y, w, h);
		g.setColor(COLOR_FORE);
		//g.drawRect(x, y, w, h);
		g.drawRect(x-1, y-1, w+1, h+1);
		//g.drawRect(x+1, y+1, w-2, h-2);
		for (int i = 0; i < controls.length; i++) {
			Control ctr = controls[i];
			ctr.paint(g);
		}
	}
}
